package org.walkerljl.boss.service.auth.res.impl;

import org.springframework.stereotype.Service;
import org.walkerljl.boss.dao.auth.res.MenuDao;
import org.walkerljl.boss.domain.auth.res.Menu;
import org.walkerljl.boss.service.auth.res.MenuService;
import org.walkerljl.boss.support.dao.BaseDao;
import org.walkerljl.boss.support.service.impl.BaseServiceImpl;
import org.walkerljl.commons.data.model.tree.TreeNode;

import javax.annotation.Resource;
import java.util.List;

/**
 * MenuServiceImpl
 *
 * @author lijunlin
 */
@Service("menuService")
public class MenuServiceImpl extends BaseServiceImpl<Long, Menu> implements MenuService {

    @Resource
    private MenuDao menuDao;

    @Override
    public BaseDao<Long, Menu> getDao() {
        return menuDao;
    }

    @Override
    public List<TreeNode> queryChildNodesByAppIdAndParentId(Long appId, Long parentId) {
        return menuDao.selectChildNodesByAppIdAndParentId(appId, parentId);
    }

    @Override
    public List<Menu> queryAuthMenusByResCodeIds(List<Long> resCodeIds) {
        return null;
    }
}